package com.sxx.beautifulcity.database;

import com.sxx.beautifulcity.entity.greendao.PluckDaoEntity;
import com.sxx.beautifulcity.entity.greendao.PluckDaoEntityDao;

import java.util.List;

/**
 * Created by dllo on 15/11/2.
 */
public class PluckHelper {

    private DaoSingleton instance = DaoSingleton.getInstance();
    private PluckDaoEntityDao pluckDao;

    public PluckHelper() {
        this.pluckDao = instance.getPluckDao();
    }

    public void savePluckList(List<PluckDaoEntity> entities){
        pluckDao.insertInTx(entities);
    }
    public void deletePluckList(List<PluckDaoEntity> datas){
        pluckDao.deleteAll();
    }
    public List<PluckDaoEntity> queryPluckAll(){
        return pluckDao.loadAll();
    }

}
